package graph;

import java.util.Arrays;

public class TDigraphTest {
    public static void main(String[] args) {
        TDigraph digraph = new TDigraph(15);
        digraph.addEdge(1, 3);
        digraph.addEdge(2, 3);
        digraph.addEdge(2, 13);
        digraph.addEdge(3, 7);
        digraph.addEdge(7, 12);
        digraph.addEdge(7, 10);
        digraph.addEdge(7, 11);
        digraph.addEdge(8, 9);
        digraph.addEdge(9, 10);
        digraph.addEdge(9, 11);
        digraph.addEdge(10, 14);
        digraph.addEdge(4, 5);
        digraph.addEdge(5, 6);
        digraph.addEdge(6, 15);

        System.out.println(Arrays.toString(digraph.topSort()));
    }
}